import instance from "@/util/request";

export function getOrder(){
    return instance({
        url:'/order/select',
        method:'GET'
    })
}

export function createOrder(params){
    return instance({
        url:'/order/create',
        method:'POST',
        params
    })
}

export function addAddress(data){
    return instance({
        url:'/address/create',
        method:'POST',
        data
    })
}

export function getAddress(){
    return instance({
        url:'/address/list',
        method:'GET'
    })
}

export function removeAddress(addressId){
    return instance({
        url:`/address/delete/${addressId}`,
        method:'DELETE'
    })
}